Numerical Analysis in Pascal ABC: Studies in Applied Mathematics by Zhavoronkov Leonid

Numerical Analysis in Pascal ABC: Studies in Applied Mathematics by Zhavoronkov Leonid

Author:Zhavoronkov, Leonid [Zhavoronkov, Leonid]
Language: eng
Format: epub
Published: 2020-01-24T16:00:00+00:00


Example 8.1. Develop the program that calculates and draws the transition curve family of the inertial link with elements C = 0.1 mcF and R = 0.51, 0.82, 1.2 kOm.

Solution.

The program Prog_8_6 (listing 8.6) contains two subroutines:

- CoordSys that draws the rectangle axes;

- Equat that calculates and draws the response family (fig.54).

Program Prog_8_6;

Uses GraphABC, ABCobjects;

Procedure CoordSys;

var j,k: integer ; var x,xc,yc: real ;var s: string ;

begin

SetWindowSize(800 ,500 );

SetPenStyle(psClear);

SetPenColor(clBlack); SetPenWidth(1 );

Line(100 ,20 ,750 ,20 ); Line(750 ,20 ,750 ,400 );

Line(100 ,20 ,100 ,400 ); Line(100 ,400 ,750 ,400 );

for k:=1 to 30 do

begin

Line(100 +21 *k, 400 , 100 +21 *k,392 );

end ;

for k:=2 to 16 do

begin

x:=0.2 *(k-1 ); Str(x:3 :1 ,s);

var t:=new TextABC(48 +42 *k,408 ,12 ,s);

end ;

for k:=1 to 11 do

begin

Line(100 ,436 -36 *k,108 ,436 -36 *k);

end ;

for k:=1 to 11 do

begin

yc:=0.1 *(k-1 ); Str(yc:2 :1 ,s);

var t:=new TextABC(72 ,426 -36 *k,12 ,s);

end ;

for k:=1 to 11 do

begin

Line(742 ,436 -36 *k,750 ,436 -36 *k);

end ;

for k:=1 to 11 do

begin

yc:=0.1 *(k-1 ); Str(yc:2 :1 ,s);

var t:=new TextABC(758 ,428 -36 *k,12 ,s);

end ;

en ;

Procedure Equat(cc, rr: real );

const x0=100 ; y0=400 ; mx=2100 ; my=360 ;

var k,x1,x2,y1,y2,u1,u2,z: integer ;

var u,y: array [0..99 ] of real ;

var b,br,t,dt,tt: real ;

begin

tt:=rr*cc; dt:=0.01 ; b:=dt/tt; y[0 ]:=0 ; t:=0 ; y2:=0 ;

for k:=1 to 30 do

begin

t:=t+dt; y[k]:=b+(1 -b)*y[k-1 ];

x1:=x0+Round(t*mx);

y1:=y0-Round(y[k]*my);

SetPenWidth(3 ); SetPenColor(clBlack);

if k>1 then

begin

Line(x1,y1,x2,y2);

end ;

x2:=x1; y2:=y1;

end ;

z:=Round(b*370 ); Line(x0,y0,x0+22 ,y0-z);

end ;

//============Main===========

var cc,rr:real ; var s1,s2,s3,s4: string ;

begin

CoordSys;

var t1:= new TextABC(525 ,185 ,12 ,'Inertial link' );

cc:=0.1 ; Str(cc:3 :1 ,s1);

var t2:= new TextABC( 540 , 210 , 12 , 'C = ' +s1);

rr:=0.51 ; Str(rr:3 :2 ,s2);

var t3:= new TextABC(180 ,104 ,12 ,'R = ' +s2);

Equat(cc,rr); rr:=0.82 ; Str(rr:3 :2 ,s3);

var t4:= new TextABC(296 ,94 ,12 ,'R = ' +s3);

Equat(cc,rr); rr:=1.2 ; Str(rr:3 :2 ,s4);

var t5:= new TextABC(400 ,104 ,12 ,'R = ' +s4);

Equat(cc,rr);

end .

Listing 8.6

The inertial link is investigated in the frequency space as its response at a harmonic input signal in the given frequency diapason with the signal amplitude being constant.

There are the expressions of the MFR and the PFR:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.